/* eslint-disable */
import echarts from 'echarts/lib/echarts';
import Chart from 'echarts-for-react/lib/core';

// 饼图
export default function ChartPie({ title = '', detail = {} }) {
  var data = [{
    "name": "530009 飞灰",
    "value": 10
  }, {
    "name": "",
    "value": 10
  } ,{
    "name": "年度炉渣量 438366吨",
    "value": 40
  },]
  const  option = {

    color: ['#A0CE3A', '#31C5C0', '#1E9BD1', '#0F347B', '#585247', '#7F6AAD', '#009D85', "rgba(250,250,250,0.3)"],
 

    grid: {
      bottom: 150,
      left: 100,
      right: '10%'
    },

    series: [
      // 主要展示层的
      {
        radius: ['45%', '61%'],
        center: ['50%', '50%'],
        type: 'pie',
        label: {
          normal: {
            show: true,
            formatter: "{b}\n{c}%",
            textStyle: {
              fontSize: 14,

            },
            position: 'outside'
          },

        },
        labelLine: {
          length: 20,
          length2: 20,
          lineStyle: {
            type: 'dashed',
          },


        },

        data: data,

      },

    ]
  };

  return (
    <div className='situational-detail'>
      <Chart
        echarts={echarts}
        option={option}
        notMerge
        lazyUpdate
        style={{ height: 190 }}
      />
    </div>
  )
}